import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import TeacherList from  '../views/user/TeacherList.vue'
import StudentList from  '../views/user/StudentList.vue'
import Profession from '../views/course/Profession.vue'
import Couse from '../views/course/Couse.vue'
import Chapter from '../views/course/Chapter.vue'
import Recommendation from '../views/course/Recommendation.vue'
import Template from  '../views/website/Template.vue'
import Page from  '../views/website/Page.vue'
import website from  '../views/website/website.vue'
import Poster from '../views/website/Poster.vue'
import Order from '../views/order/Order.vue'


Vue.use(VueRouter)

const routes = [
  {path: '/', redirect:'/login'},
  {path: '/login', name: '登录', component: Login},
  {path: '/Home', name: '主页面', component: Home,children:[
      {path: '/TeacherList', name: '老师列表', component: TeacherList},
      {path: '/StudentList', name: '学员列表', component: StudentList},
      {path: '/Profession', name: '专业管理', component: Profession},
      {path: '/Couse', name: '课程管理', component: Couse},
      {path: '/Chapter', name: '章节管理', component: Chapter},
      {path: '/Recommendation', name: '课程推荐管理', component: Recommendation},
      {path: '/Template', name: '模板管理', component: Template},
      {path: '/Page', name: '页面管理', component: Page},
      {path: '/website', name: '网站信息管理', component: website},
      {path: '/Poster', name: '广告管理', component: Poster},
      {path: '/Order', name: '订单列表', component: Order},
    ]},

]

const router = new VueRouter({
  routes
})

export default router
